package com.zmn.oms.dubbo.interfaces.zmn.normal.order;

import com.zmn.common.dto2.ResponseDTO;
import com.zmn.oms.dubbo.dto.zmn.order.OrderQuotationDRO;
import com.zmn.oms.dubbo.dto.zmn.order.OrderQuotationDiscountDRO;
import com.zmn.oms.dubbo.dto.zmn.serviceitem.OrderServiceItemDRO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 类描述：计价器接口
 *
 * @author yule
 * @date 2020/12/3 21:18
 */
@Api(value = "计价器相关接口", tags = {"计价器小程序查询相关接口"})
public interface OrderWorkQuotationRemoteService {

    /**
     * 描述：获取订单优惠信息
     *
     * @param orderId 订单id
     * @param workId  工单id
     * @return
     */
    @ApiOperation(value = "根据id查询订单优惠信息", notes = "会查询出订单相关的费用及优惠信息")
    ResponseDTO<OrderQuotationDRO> getOrderQuotationDiscountById(@ApiParam(value = "订单id", required = true) @NotNull(message = "订单号不能为空") Long orderId,
                                                                 @ApiParam(value = "工单id", required = true) @NotNull(message = "工单号不能为空") Long workId);

    /**
     * 描述：申请优惠通知
     *
     * @param orderId 订单id
     * @param workId  工单id
     * @return
     */
    @ApiOperation(value = "申请优惠消息通知", notes = "发送申请优惠消息通知给用户进行优惠报价确认")
    ResponseDTO<Boolean> applyOrderDiscountNoticeById(@ApiParam(value = "订单id", required = true) @NotNull(message = "订单号不能为空") Long orderId,
                                                      @ApiParam(value = "工单id", required = true) @NotNull(message = "工单号不能为空") Long workId);

    /**
     * 描述：申请优惠折扣及是否能申请优惠
     *
     * @param orderId
     * @param workId
     * @return
     */
    @ApiOperation(value = "获取优惠折扣", notes = "订单渠道是否有优惠及最大优惠值")
    ResponseDTO<OrderQuotationDiscountDRO> getQuotationMaxDiscountAmount(@ApiParam(value = "订单id", required = true) @NotNull(message = "订单号不能为空") Long orderId,
                                                                         @ApiParam(value = "工单id", required = true) @NotNull(message = "工单号不能为空") Long workId);

    /**
     * 描述：获取优惠Id
     *
     * @param orderId
     * @param workId
     * @return
     */
    @ApiOperation(value = "获取优惠Id", notes = "获取最大优惠的Id")
    ResponseDTO<Integer> getPromId(@ApiParam(value = "订单id", required = true) @NotNull(message = "订单号不能为空") Long orderId,
                                                                         @ApiParam(value = "工单id", required = true) @NotNull(message = "工单号不能为空") Long workId);

    /**
     * 描述：获取人工优惠
     *
     * @param orderId
     * @return
     */
    @ApiOperation(value = "获取人工优惠")
    ResponseDTO<Integer> getArtificialOffer(@ApiParam(value = "订单id", required = true) @NotNull(message = "订单号不能为空") Long orderId);
    /**
     * 描述：获取订单故障项目最新列表
     *
     * @param orderId
     * @param workId
     * @return
     */
    @ApiOperation(value = "获取订单故障项目", notes = "获取订单故障项目列表")
    ResponseDTO<List<OrderServiceItemDRO>> getQuotationServiceItemsById(@ApiParam(value = "订单id", required = true) @NotNull(message = "订单号不能为空") Long orderId,
                                                                        @ApiParam(value = "工单id", required = true) @NotNull(message = "工单号不能为空") Long workId);

    /**
     * 描述：判断订单能否点击申请优惠按钮
     *
     * @param orderId
     * @param workId
     * @return
     */
    @ApiOperation(value = "能否申请优惠", notes = "权限校验能否点击申请优惠")
    ResponseDTO checkOrderCanApplyDiscount(@ApiParam(value = "订单id", required = true) @NotNull(message = "订单号不能为空") Long orderId,
                                                    @ApiParam(value = "工单id", required = true) @NotNull(message = "工单号不能为空") Long workId);

}
